@extends('layouts.adminlayout')

@section('main')

<p>{{ link_to_route('courses.index', 'Trở lại danh sách khoá thi',null, array('class'=>'btn btn-info')) }}</p>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">Khoá thi <small>Khoá thi</small></h3>
                </div><!-- /.box-header -->
                <div class="box-body table-responsive">
                    <table class="table table-striped table-bordered">
                        <thead>
                            <tr>
                                <th>Mã Khoá Thi</th>
                                <th>Ngày Thi</th>
                                <th>Hội Đồng Thi</th>
                                <th></th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>{{{ $khoa_thi->ma_khoa_thi }}}</td>
                                <td>{{{ $khoa_thi->ngay_thi }}}</td>
                                <td>
                                <?php 
                                    $hoi_dong_thi = new Hoi_dong_thi();
                                    $ten_hoi_dong_thi = $hoi_dong_thi->getTenhoidongthi($khoa_thi->HoiDongThi_Id);
                                    echo $ten_hoi_dong_thi;
                                ?>
                                </td>
                                <td>{{ link_to_route('courses.edit', 'Chỉnh Sửa', array($khoa_thi->id), array('class' => 'btn btn-info')) }}</td>
                                <td>
                                    {{ Form::open(array('method' => 'DELETE', 'route' => array('courses.destroy', $khoa_thi->id))) }}
                                    {{ Form::submit('Xoá', array('class' => 'btn btn-danger')) }}
                                    {{ Form::close() }}
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div><!-- /.box -->
            </div>
        </div>
</section>

@stop